/**
*附件管理
*/
import request from '@/utils/request'
// 列表
export function fetchList(query) {
  return request({
    url: '/admin/managerNav/index',
    method: 'post',
    data: query
  })
}

// 添加
export function add(params) {
  return request({
    url: '/admin/managerNav/add',
    method: 'post',
    data: params
  })
}
// 获取当前行信息
export function rows(ids) {
  return request({
    url: '/admin/managerNav/edit',
    method: 'get',
    params: {
      id: ids
    }
  })
}
// 获取当前父级菜单
export function ruleData() {
  return request({
    url: '/admin/managerNav/ruleData',
    method: 'get'
  })
}
// 获取当前有权限的操作菜单
export function menuList() {
  return request({
    url: '/admin/managerNav/menuList',
    method: 'get'
  })
}
// 编辑
export function edit(ids, pid, title, name, icon, remark, status, type, url, router_path,
  router_view,
  router_name) {
  return request({
    url: '/admin/managerNav/edit',
    method: 'post',
    data: {
      id: ids, pid, title, name, icon, remark, status, type, url,
      router_path,
      router_view,
      router_name
    }
  })
}

// 删除
export function del(ids) {
  return request({
    url: '/admin/managerNav/del',
    method: 'post',
    data: {
      ids
    }
  })
}
